<?php

namespace App\Http\Controllers\Api\QianDao;

use App\Http\Controllers\Common\ApiController;
use App\Models\QianDao\HongMe;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Log;

class IndexController extends ApiController{


    public function location(Request $request) {
        $info = $request->input();
        Log::info('location',$info);
        return responseSuccess($info);
    }

    public function hongme(Request $request){
        $info = $request->input();
        //Log::info('hongme',$info);
        $request_id = $info['requestId'];
        $user_id = $info['userId'];
        $name = $info['name'];
        $depart_name = $info['departName'];
        $phone_number = $info['phoneNumber'];
        $device_sn = $info['deviceSn'];
        $location_result = $info['locationResult'];
        $attend_type = $info['attendType'];
        $id_number = $info['idNumber'];
        $card_no = $info['cardNo'];
        $work_sn = $info['workSn'];
        $duty_name = $info['dutyName'];
        $alcohol_result = $info['alcoholResult'];
        $alcohol_standard = $info['alcoholStandard'];
        $recog_time = $info['recogTime'];
        $send_time = $info['sendTime'];

        $record = compact('request_id','user_id','name','depart_name','phone_number','device_sn','location_result','attend_type','id_number','card_no','work_sn',
        'duty_name','alcohol_result','alcohol_standard','recog_time','send_time');
        //HongMe::query()->create($record);
        return response('结果成功！');
    }


}
